package com.jeesite.modules.dataScreen.service;

import cn.hutool.core.util.NumberUtil;
import com.jeesite.modules.dataScreen.dao.IrsDao;
import com.jeesite.modules.dataScreen.utils.MyNumberUtil;
import com.jeesite.modules.dataScreen.web.vo.IndexRightTopDataVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigInteger;
import java.util.List;

@Service
public class IrsService {

    @Resource
    private IrsDao irsDao;

    public List<IndexRightTopDataVo> indexRightTop() {
        List<IndexRightTopDataVo> result = irsDao.getIndexRightTop();
        for (IndexRightTopDataVo dataVo : result) {
            dataVo.setValue(MyNumberUtil.abbreviate(Long.parseLong(dataVo.getValue())));
        }
        return result;
    }


}
